import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                /*  以下是 所有菜单及其对应路由，写了几个实在写不下去了，自己的版块按下面的格式写就行了
                        步骤：
                            1、/components/page/ 文件夹下新建一个目录或组件
                            2、复制下面某一段 { Path: ...... }
                            3、修改 path:路由 、 title:菜单名 、 '../components/page/...' 组件路径
                            4、完事了
                                                                                    ———— 王泰元
                */

                /*
                    学校列表,/schoollist
                    添加学校,/schooladd
                    教师列表,/teacherlist
                    用户列表,/userlist
                    我的班级,/klasslist
                    创建班级,/klassadd
                    学生管理,/studentlist
                    发布通知,/adviceadd
                    通知类型管理,/advicetype
                    通知列表,/advicelist
                    学生请假审核,/leavecheck
                    学生请假记录,/leavelist
                    相册列表,/photolist
                    发布相册,/photoadd
                    投票列表,/votelist
                    发布投票,/voteadd
                    带药提醒,/healthnotice
                    今日点名,/todayattend
                    出勤统计,/attendlist
                    发布作业,/jobadd
                    批改作业,/jobcheck
                    作业统计,/joblist
                */
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/schoollist',
                    component: () => import(/* webpackChunkName: "schoollist" */ '../components/page/schoollist.vue'),
                    meta: { title: '学校列表' }
                },
                {
                    path: '/schooladd',
                    component: () => import(/* webpackChunkName: "schooladd" */ '../components/page/schooladd.vue'),
                    meta: { title: '添加学校' }
                },
                {
                    path: '/teacherlist',
                    component: () => import(/* webpackChunkName: "teacherlist" */ '../components/page/teacherlist.vue'),
                    meta: { title: '教师列表' }
                },
                {
                    path: '/photolist',
                    component: () => import(/* webpackChunkName: "teacherlist" */ '../components/page/PhotoList.vue'),
                    meta: { title: '相册列表' }
                },
                {
                    path: '/photoadd',
                    component: () => import(/* webpackChunkName: "teacherlist" */ '../components/page/PhotoAdd.vue'),
                    meta: { title: '发布相册' }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/JobAdd',
                    component: () => import(/* webpackChunkName: "JobAdd" */ '../components/page/JobAdd.vue'),
                    meta: { title: '发布作业' }
                },
                {
                    path: '/JobCheck',
                    component: () => import(/* webpackChunkName: "JobCheck" */ '../components/page/JobCheck.vue'),
                    meta: { title: '批改作业' }
                },
                {
                    path: '/JobList',
                    component: () => import(/* webpackChunkName: "JobList" */ '../components/page/JobList.vue'),
                    meta: { title: '作业列表' }
                },
                {
                    path: '/adviceadd',
                    component: () => import(/* webpackChunkName: "adviceadd" */ '../components/page/AddAdvice.vue'),
                    meta: { title: '发布通知' }
                },
                {
                    path: '/advicelist',
                    component: () => import(/* webpackChunkName: "advicelist" */ '../components/page/AdviceList.vue'),
                    meta: { title: '通知列表' }
                },
                {
                    path: '/advicetype',
                    component: () => import(/* webpackChunkName: "advicetype" */ '../components/page/AdviceTypeList.vue'),
                    meta: { title: '通知类型管理' }
                },
                {
                    path: '/adviceInfo',
                    component: () => import(/* webpackChunkName: "advicetype" */ '../components/page/AdviceInfo.vue'),
                    meta: { title: '通知详情' }
                },
                {
                    path: '/voteList',
                    component: () => import(/* webpackChunkName: "voteList" */ '../components/page/VoteList.vue'),
                    meta: { title: '投票列表' }
                },
                // 学生请假审核,/leavecheck
                // 学生请假记录,/leavelist
                {
                    path: '/leavecheck',
                    component: () => import(/* webpackChunkName: "advicetype" */ '../components/page/Leavecheck.vue'),
                    meta: { title: '学生请假审核' }
                },
                {
                    path: '/leavelist',
                    component: () => import(/* webpackChunkName: "voteList" */ '../components/page/Leavelist.vue'),
                    meta: { title: '学生请假记录' }
                },
                {
                    path: '/voteAdd',
                    component: () => import(/* webpackChunkName: "voteAdd" */ '../components/page/VoteAdd.vue'),
                    meta: { title: '新增投票' }
                },
                {
                    path: '/todayattend',
                    component: () => import(/* webpackChunkName: "todayattend" */ '../components/page/TodayCall.vue'),
                    meta: { title: '今日点名' }
                },
                {
                    path: '/attendlist',
                    component: () => import(/* webpackChunkName: "attendlist" */ '../components/page/AttendList.vue'),
                    meta: { title: '出勤统计' }
                },
                {
                    path: '/healthnotice',
                    component: () => import(/* webpackChunkName: "healthnotice" */ '../components/page/HealthNotice.vue'),
                    meta: { title: '带药提醒' }
                },
                {
                  path: '/klassadd',
                  component: () => import(/* webpackChunkName: "attendlist" */ '../components/page/klassadd.vue'),
                  meta: { title: '创建班级' }
              },
              {
                path: '/klasslist',
                component: () => import(/* webpackChunkName: "attendlist" */ '../components/page/klasslist.vue'),
                meta: { title: '创建班级' }
            },
            {
              path: '/studentInfo',
              component: () => import(/* webpackChunkName: "advicetype" */ '../components/page/StudentInfo.vue'),
              meta: { title: '班级详情' }
          },
          {
            path: '/studentlist',
            component: () => import(/* webpackChunkName: "advicetype" */ '../components/page/studentlist.vue'),
            meta: { title: '学生管理' }
        },
        {
          path: '/userlist',
          component: () => import(/* webpackChunkName: "advicetype" */ '../components/page/userlist.vue'),
          meta: { title: '用户列表' }
      },
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
